package com.bqy.locationfactory.baidu;

import android.content.Context;
import android.os.Bundle;
import android.view.View;

import com.baidu.mapapi.map.MapView;
import com.bqy.locationfactory.base.AbsMapView;

/**
 * Created by lenovo on 2018/1/6.
 */

public class BaiduMapView extends AbsMapView {

    private MapView mapView;

    private MapView getMapView() {
        if (this.mapView == null) {
            this.mapView = new MapView(getContext());
        }
        return this.mapView;
    }

    public BaiduMapView(Context context) {
        super(context);
    }

    @Override
    public View getView() {
        return getMapView();
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        getMapView().onSaveInstanceState(outState);
    }

    @Override
    public void onResume() {
        getMapView().onResume();
    }

    @Override
    public void onPause() {
        getMapView().onPause();
    }

    @Override
    public void onDestroy() {
        getMapView().onDestroy();
    }

}
